home *** CD-ROM | disk | FTP | other *** search
- /**************************************************************************/
- /* DelKV.ucwx */
- /* */
- /* Copyright ©1998 by Dick Whiting */
- /* */
- /*------------------------------------------------------------------------*/
- /* Delete a key=value pair */
- /* See the UrbCedWWW Readme for a more complete description. */
- /**************************************************************************/
- /*
- $VER: 1.0 Copyright ©1998 by Dick Whiting
- */
-
- options results
- Address CYGNUSED
-
- startline=-1
- endline=-1
- startcol=-1
- endcol=-1
-
- 'CEDTOFRONT'
-
- starttag=1
-
- 'STATUS NUMLINES'
- numlines=result
-
- 'STATUS CURSORCOLUMN'
- startcol=result+1
-
- 'GETCHAR'
- char=result
-
- do while (char~=' ' & startcol>1)
- 'LEFT'
- 'GETCHAR'
- char=result
- 'STATUS CURSORCOLUMN'
- colptr=result
- 'STATUS CURSORLINE'
- currline=result
- if (colptr=0 & currline=0) then do
- 'OKAY1' 'Unable to find beginning value'
- exit
- end
- startcol=colptr+1
- end
-
- 'STATUS CURSORLINE'
- startline=result+1
-
- 'RIGHT'
- 'GETCHAR'
- char=result
-
- do while (char~=' ' & char~='>')
- 'RIGHT'
- 'GETCHAR'
- char=result
- 'STATUS CURSORCOLUMN'
- colptr=result+1
- 'STATUS CURSORLINE'
- currline=result
- 'STATUS LINEMEMORYLENGTH'
- linelen=result
- if (colptr>=linelen & currline>=numlines) then do
- 'OKAY1' 'At end-of-file'
- exit
- end
-
- if char='"' then do
- do until char='"'
- 'RIGHT'
- 'GETCHAR'
- char=result
- 'STATUS CURSORCOLUMN'
- colptr=result+1
- 'STATUS CURSORLINE'
- currline=result
- 'STATUS LINEMEMORYLENGTH'
- linelen=result
- if (colptr>=linelen & currline>=numlines) then do
- 'OKAY1' 'At end-of-file'
- exit
- end
- end
- end
- end
-
- 'STATUS CURSORCOLUMN'
- endcol=result+1
-
- 'STATUS CURSORLINE'
- endline=result+1
-
- if ((startline>-1) & (endline>-1)) then do
- 'LL' startline startcol
- 'MARK'
- on=result
- if ~on then 'MARK'
- 'LL' endline endcol
- end
-
- 'CUT'
-
- exit
-
-
-